const Koa = require("koa");

const app = new Koa();

// koa 没有路由系统，只有中间件
app.use((ctx) => {
  console.log(ctx.request.url, ctx.request.method);
  console.log(ctx.headers, ctx.query, ctx.method);
  ctx.body = "Hello Koa";
});

app.listen(3000, () => {
  console.log("Server is running at http://localhost:3000");
});
